home *** CD-ROM | disk | FTP | other *** search
- /*
- -- ANSI C code generated by :
- -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82) --
- -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
- -- Dominique COLNET and Suzanne COLLIN - colnet@loria.fr --
- -- http://www.loria.fr/SmallEiffel --
- */
- #include "compile_to_c.h"
- T0* r235item(T235* C,int a1){
- T0* R=NULL;
- R=((((T235*)C))->_storage/*0*/)[(a1)-((((T235*)C))->_lower/*12*/)];
- return R;
- }
- /*No:ARRAY[CREATION_CLAUSE].storage*/
- /*No:ARRAY[CREATION_CLAUSE].capacity*/
- /*No:ARRAY[CREATION_CLAUSE].lower*/
- /*No:ARRAY[CREATION_CLAUSE].put*/
- /*No:ARRAY[CREATION_CLAUSE].upper*/
- int r235count(T235* C){
- int R=0;
- R=(((((T235*)C))->_upper/*8*/)-((((T235*)C))->_lower/*12*/))+(1);
- return R;
- }
- void r235add_last(T235* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T235*)C))->_capacity/*4*/)<((r235count(C))+(1))) {
- /*IF*/if (((((T235*)C))->_capacity/*4*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T235*)C))->_capacity/*4*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T235*)C))->_capacity/*4*/);
- C->_storage=r513realloc((((T235*)C))->_storage/*0*/,(((T235*)C))->_capacity/*4*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T235*)C))->_upper/*8*/)+(1);
- /*[IRF3.6put*/{T235* C1=C;
- T0* b1=a1;
- int b2=(((T235*)C))->_upper/*8*/;
- ((((T235*)C1))->_storage/*0*/)[(b2)-((((T235*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- }
- T0* r235first(T235* C){
- T0* R=NULL;
- R=r235item(C,(((T235*)C))->_lower/*12*/);
- return R;
- }
- void r477clear_all(T477* C){
- T0* _value=NULL;
- /*[IRF3.6set_all_with*/{T477* C1=C;
- T0* b1=_value;
- r778set_all_with((((T477*)C1))->_storage/*4*/,b1,((((T477*)C1))->_upper/*12*/)-((((T477*)C1))->_lower/*16*/));
- }/*]*/
- }
- /*No:ARRAY[RUN_FEATURE].set_all_with*/
- void r477force(T477* C,T0* a1,int a2){
- /*IF*/if (((((T477*)C))->_upper/*12*/)<(a2)) {
- r477resize(C,(((T477*)C))->_lower/*16*/,a2);
- }
- else if ((a2)<((((T477*)C))->_lower/*16*/)) {
- r477resize(C,a2,(((T477*)C))->_upper/*12*/);
- }
- /*FI*//*[IRF3.6put*/{T477* C1=C;
- T0* b1=a1;
- int b2=a2;
- ((((T477*)C1))->_storage/*4*/)[(b2)-((((T477*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- }
- void r477make(T477* C,int a1,int a2){
- int _needed=0;
- C->_lower=a1;
- C->_upper=a2;
- _needed=((a2)-(a1))+(1);
- /*IF*/if ((_needed)>(0)) {
- /*IF*/if (((((T477*)C))->_capacity/*8*/)<(_needed)) {
- /*IF*/if (((((T477*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- else {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- /*FI*/C->_capacity=_needed;
- }
- else {
- r477clear_all(C);
- }
- /*FI*/}
- /*FI*/}
- T0* r477item(T477* C,int a1){
- T0* R=NULL;
- R=((((T477*)C))->_storage/*4*/)[(a1)-((((T477*)C))->_lower/*16*/)];
- return R;
- }
- void r477resize(T477* C,int a1,int a2){
- int _mem=0;
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T477*n=malloc(sizeof(*n));
- *n=M477;
- r477make(n,a1,a2);
- _other=(T0*)n;
- }
- _i=r2max((((T477*)C))->_lower/*16*/,/*X477*/((int)(((T477*)((T477*)_other)))->_lower/*16*/));
- _up=r2min((((T477*)C))->_upper/*12*/,/*X477*/((int)(((T477*)((T477*)_other)))->_upper/*12*/));
- while (!((_i)>(_up))) {
- /*X477*//*[IRF3.6put*/{T477* C1=((T477*)_other);
- T0* b1=r477item(C,_i);
- int b2=_i;
- ((((T477*)C1))->_storage/*4*/)[(b2)-((((T477*)C1))->_lower/*16*/)]=(b1);
- }/*]*/
- _i=(_i)+(1);
- }
- *((T477*)(C))=*((T477*)(_other));
- }
- /*No:ARRAY[RUN_FEATURE].storage*/
- /*No:ARRAY[RUN_FEATURE].capacity*/
- /*No:ARRAY[RUN_FEATURE].lower*/
- /*No:ARRAY[RUN_FEATURE].put*/
- /*No:ARRAY[RUN_FEATURE].upper*/
- int r477count(T477* C){
- int R=0;
- R=(((((T477*)C))->_upper/*12*/)-((((T477*)C))->_lower/*16*/))+(1);
- return R;
- }
- T0* r147item(T147* C,int a1){
- T0* R=NULL;
- R=((((T147*)C))->_storage/*0*/)[(a1)-((((T147*)C))->_lower/*12*/)];
- return R;
- }
- /*No:ARRAY[E_WHEN].storage*/
- T0* r147twin(T147* C){
- T0* R=NULL;
- R=malloc(sizeof(*C));
- *((T147*)R)=M147;
- r147copy(((T147*)R),((T0*)C));
- return R;
- }
- /*No:ARRAY[E_WHEN].capacity*/
- void r147copy(T147* C,T0* a1){
- int _needed_capacity=0;
- C->_lower=(((T147*)((T147*)a1)))->_lower/*12*/;
- C->_upper=(((T147*)((T147*)a1)))->_upper/*8*/;
- _needed_capacity=(((((T147*)C))->_upper/*8*/)-((((T147*)C))->_lower/*12*/))+(1);
- /*IF*/if (((((T147*)C))->_capacity/*4*/)<(_needed_capacity)) {
- C->_capacity=_needed_capacity;
- C->_storage=calloc((((T147*)C))->_capacity/*4*/,sizeof(T0*));
- }
- /*FI*//*IF*/if ((_needed_capacity)>(0)) {
- r586copy_from((((T147*)C))->_storage/*0*/,(((T147*)((T147*)a1)))->_storage/*0*/,(_needed_capacity)-(1));
- }
- /*FI*/}
- /*No:ARRAY[E_WHEN].lower*/
- /*No:ARRAY[E_WHEN].put*/
- /*No:ARRAY[E_WHEN].upper*/
- int r147count(T147* C){
- int R=0;
- R=(((((T147*)C))->_upper/*8*/)-((((T147*)C))->_lower/*12*/))+(1);
- return R;
- }
- void r147add_last(T147* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T147*)C))->_capacity/*4*/)<((r147count(C))+(1))) {
- /*IF*/if (((((T147*)C))->_capacity/*4*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T147*)C))->_capacity/*4*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T147*)C))->_capacity/*4*/);
- C->_storage=r586realloc((((T147*)C))->_storage/*0*/,(((T147*)C))->_capacity/*4*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T147*)C))->_upper/*8*/)+(1);
- /*[IRF3.6put*/{T147* C1=C;
- T0* b1=a1;
- int b2=(((T147*)C))->_upper/*8*/;
- ((((T147*)C1))->_storage/*0*/)[(b2)-((((T147*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- }
- /*No:FIXED_ARRAY[TYPE_BIT_REF].item*/
- /*No:FIXED_ARRAY[TYPE_BIT_REF].storage*/
- /*No:FIXED_ARRAY[TYPE_BIT_REF].capacity*/
- void r41with_capacity(T41* C,int a1){
- /*IF*/if (((((T41*)C))->_capacity/*8*/)<(a1)) {
- C->_storage=calloc(a1,sizeof(T0*));
- C->_capacity=a1;
- }
- /*FI*/C->_upper=-(1);
- }
- /*No:FIXED_ARRAY[TYPE_BIT_REF].put*/
- /*No:FIXED_ARRAY[TYPE_BIT_REF].upper*/
- void r41add_last(T41* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if ((((((T41*)C))->_upper/*12*/)+(1))<=(((((T41*)C))->_capacity/*8*/)-(1))) {
- C->_upper=((((T41*)C))->_upper/*12*/)+(1);
- }
- else if (((((T41*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(2,sizeof(T0*));
- C->_capacity=2;
- C->_upper=0;
- }
- else {
- _new_capacity=(2)*((((T41*)C))->_capacity/*8*/);
- C->_storage=r539realloc((((T41*)C))->_storage/*4*/,(((T41*)C))->_capacity/*8*/,_new_capacity);
- C->_capacity=_new_capacity;
- C->_upper=((((T41*)C))->_upper/*12*/)+(1);
- }
- /*FI*//*[IRF3.5put*/((((T41*)C))->_storage/*4*/)[(((T41*)C))->_upper/*12*/]=(a1);
- /*]*/
- }
- /*No:FIXED_ARRAY[INTEGER].clear_all*/
- /*No:FIXED_ARRAY[INTEGER].set_all_with*/
- void r226make(T226* C,int a1){
- /*IF*/if ((a1)==(0)) {
- C->_upper=-(1);
- }
- else if (((((T226*)C))->_capacity/*4*/)==(0)) {
- C->_storage=calloc(a1,sizeof(int));
- C->_capacity=a1;
- C->_upper=(a1)-(1);
- }
- else if (((((T226*)C))->_capacity/*4*/)<(a1)) {
- C->_storage=calloc(a1,sizeof(int));
- C->_capacity=a1;
- C->_upper=(a1)-(1);
- }
- else {
- C->_upper=(a1)-(1);
- /*[IRF3.6clear_all*/{T226* C1=C;
- int __value=0;
- /*[IRF3.6set_all_with*/{T226* C2=C1;
- int c1=__value;
- r686set_all_with((((T226*)C2))->_storage/*0*/,c1,(((T226*)C2))->_upper/*8*/);
- }/*]*/
- }/*]*/
- }
- /*FI*/}
- int r226fast_has(T226* C,int a1){
- int R=0;
- /*IF*/if ((/*(IRF4.6count*/((((T226*)C))->_upper/*8*/)+(1)/*)*/)>(0)) {
- R=(r226fast_index_of(C,a1))<=((((T226*)C))->_upper/*8*/);
- }
- /*FI*/return R;
- }
- /*No:FIXED_ARRAY[INTEGER].item*/
- void r226resize(T226* C,int a1){
- int _elt_default=0;
- int _i=0;
- int _new_capacity=0;
- /*IF*/if ((a1)<=(/*(IRF4.6count*/((((T226*)C))->_upper/*8*/)+(1)/*)*/)) {
- C->_upper=(a1)-(1);
- }
- else {
- _new_capacity=a1;
- /*IF*/if (((((T226*)C))->_capacity/*4*/)<(_new_capacity)) {
- /*IF*/if (((((T226*)C))->_capacity/*4*/)==(0)) {
- C->_storage=calloc(_new_capacity,sizeof(int));
- }
- else {
- C->_storage=r686realloc((((T226*)C))->_storage/*0*/,(((T226*)C))->_capacity/*4*/,_new_capacity);
- }
- /*FI*/C->_capacity=_new_capacity;
- }
- /*FI*/_new_capacity=(((T226*)C))->_upper/*8*/;
- C->_upper=(a1)-(1);
- _i=(((T226*)C))->_upper/*8*/;
- while (!((_i)==(_new_capacity))) {
- /*[IRF3.5put*/((((T226*)C))->_storage/*0*/)[_i]=(_elt_default);
- /*]*/
- _i=(_i)-(1);
- }
- }
- /*FI*/}
- /*No:FIXED_ARRAY[INTEGER].storage*/
- /*No:FIXED_ARRAY[INTEGER].capacity*/
- void r226copy(T226* C,T0* a1){
- int _new_capacity=0;
- int _other_upper=0;
- _other_upper=(((T226*)((T226*)a1)))->_upper/*8*/;
- /*IF*/if ((_other_upper)>=(0)) {
- _new_capacity=(_other_upper)+(1);
- /*IF*/if (((((T226*)C))->_capacity/*4*/)<(_new_capacity)) {
- C->_capacity=_new_capacity;
- C->_storage=calloc(_new_capacity,sizeof(int));
- }
- else if (((((T226*)C))->_capacity/*4*/)>(0)) {
- r686clear_all((((T226*)C))->_storage/*0*/,((((T226*)C))->_capacity/*4*/)-(1));
- }
- /*FI*/r686copy_from((((T226*)C))->_storage/*0*/,(((T226*)((T226*)a1)))->_storage/*0*/,_other_upper);
- }
- else if (((((T226*)C))->_capacity/*4*/)>(0)) {
- r686clear_all((((T226*)C))->_storage/*0*/,((((T226*)C))->_capacity/*4*/)-(1));
- }
- /*FI*/C->_upper=_other_upper;
- }
- /*No:FIXED_ARRAY[INTEGER].lower*/
- void r226with_capacity(T226* C,int a1){
- /*IF*/if (((((T226*)C))->_capacity/*4*/)<(a1)) {
- C->_storage=calloc(a1,sizeof(int));
- C->_capacity=a1;
- }
- /*FI*/C->_upper=-(1);
- }
- int r226fast_index_of(T226* C,int a1){
- int R=0;
- R=r686fast_index_of((((T226*)C))->_storage/*0*/,a1,(((T226*)C))->_upper/*8*/);
- return R;
- }
- /*No:FIXED_ARRAY[INTEGER].put*/
- /*No:FIXED_ARRAY[INTEGER].upper*/
- /*No:FIXED_ARRAY[INTEGER].count*/
- void r226add_last(T226* C,int a1){
- int _new_capacity=0;
- /*IF*/if ((((((T226*)C))->_upper/*8*/)+(1))<=(((((T226*)C))->_capacity/*4*/)-(1))) {
- C->_upper=((((T226*)C))->_upper/*8*/)+(1);
- }
- else if (((((T226*)C))->_capacity/*4*/)==(0)) {
- C->_storage=calloc(2,sizeof(int));
- C->_capacity=2;
- C->_upper=0;
- }
- else {
- _new_capacity=(2)*((((T226*)C))->_capacity/*4*/);
- C->_storage=r686realloc((((T226*)C))->_storage/*0*/,(((T226*)C))->_capacity/*4*/,_new_capacity);
- C->_capacity=_new_capacity;
- C->_upper=((((T226*)C))->_upper/*8*/)+(1);
- }
- /*FI*//*[IRF3.5put*/((((T226*)C))->_storage/*0*/)[(((T226*)C))->_upper/*8*/]=(a1);
- /*]*/
- }
- void r32clear_all(T32* C){
- T0* _value=NULL;
- /*[IRF3.6set_all_with*/{T32* C1=C;
- T0* b1=_value;
- r500set_all_with((((T32*)C1))->_storage/*4*/,b1,(((T32*)C1))->_upper/*12*/);
- }/*]*/
- }
- /*No:FIXED_ARRAY[EXPRESSION].set_all_with*/
- void r32make(T32* C,int a1){
- /*IF*/if ((a1)==(0)) {
- C->_upper=-(1);
- }
- else if (((((T32*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(a1,sizeof(T0*));
- C->_capacity=a1;
- C->_upper=(a1)-(1);
- }
- else if (((((T32*)C))->_capacity/*8*/)<(a1)) {
- C->_storage=calloc(a1,sizeof(T0*));
- C->_capacity=a1;
- C->_upper=(a1)-(1);
- }
- else {
- C->_upper=(a1)-(1);
- r32clear_all(C);
- }
- /*FI*/}
- T0* r32item(T32* C,int a1){
- T0* R=NULL;
- R=((((T32*)C))->_storage/*4*/)[a1];
- return R;
- }
- void r32resize(T32* C,int a1){
- T0* _elt_default=NULL;
- int _i=0;
- int _new_capacity=0;
- /*IF*/if ((a1)<=(r32count(C))) {
- C->_upper=(a1)-(1);
- }
- else {
- _new_capacity=a1;
- /*IF*/if (((((T32*)C))->_capacity/*8*/)<(_new_capacity)) {
- /*IF*/if (((((T32*)C))->_capacity/*8*/)==(0)) {
- C->_storage=calloc(_new_capacity,sizeof(T0*));
- }
- else {
- C->_storage=r500realloc((((T32*)C))->_storage/*4*/,(((T32*)C))->_capacity/*8*/,_new_capacity);
- }
- /*FI*/C->_capacity=_new_capacity;
- }
- /*FI*/_new_capacity=(((T32*)C))->_upper/*12*/;
- C->_upper=(a1)-(1);
- _i=(((T32*)C))->_upper/*12*/;
- while (!((_i)==(_new_capacity))) {
- /*[IRF3.6put*/{T32* C1=C;
- T0* b1=_elt_default;
- int b2=_i;
- ((((T32*)C1))->_storage/*4*/)[b2]=(b1);
- }/*]*/
- _i=(_i)-(1);
- }
- }
- /*FI*/}
- /*No:FIXED_ARRAY[EXPRESSION].storage*/
- /*No:FIXED_ARRAY[EXPRESSION].capacity*/
- /*No:FIXED_ARRAY[EXPRESSION].put*/
- /*No:FIXED_ARRAY[EXPRESSION].upper*/
- int r32count(T32* C){
- int R=0;
- R=((((T32*)C))->_upper/*12*/)+(1);
- return R;
- }
- /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].clear_all*/
- /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].set_all_with*/
- void r943make(T943* C,int a1,int a2){
- int _needed=0;
- C->_lower=a1;
- C->_upper=a2;
- _needed=((a2)-(a1))+(1);
- /*IF*/if ((_needed)>(0)) {
- /*IF*/if (((((T943*)C))->_capacity/*4*/)<(_needed)) {
- /*IF*/if (((((T943*)C))->_capacity/*4*/)==(0)) {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- else {
- C->_storage=calloc(_needed,sizeof(T0*));
- }
- /*FI*/C->_capacity=_needed;
- }
- else {
- /*[IRF3.6clear_all*/{T943* C1=C;
- T0* __value=NULL;
- /*[IRF3.6set_all_with*/{T943* C2=C1;
- T0* c1=__value;
- r354set_all_with((((T943*)C2))->_storage/*0*/,c1,((((T943*)C2))->_upper/*8*/)-((((T943*)C2))->_lower/*12*/));
- }/*]*/
- }/*]*/
- }
- /*FI*/}
- /*FI*/}
- T0* r943item(T943* C,int a1){
- T0* R=NULL;
- R=((((T943*)C))->_storage/*0*/)[(a1)-((((T943*)C))->_lower/*12*/)];
- return R;
- }
- void r943resize(T943* C,int a1,int a2){
- int _mem=0;
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T943*n=malloc(sizeof(*n));
- *n=M943;
- r943make(n,a1,a2);
- _other=(T0*)n;
- }
- _i=r2max((((T943*)C))->_lower/*12*/,(((T943*)((T943*)_other)))->_lower/*12*/);
- _up=r2min((((T943*)C))->_upper/*8*/,(((T943*)((T943*)_other)))->_upper/*8*/);
- while (!((_i)>(_up))) {
- /*[IRF3.6put*/{T943* C1=((T943*)_other);
- T0* b1=r943item(C,_i);
- int b2=_i;
- ((((T943*)C1))->_storage/*0*/)[(b2)-((((T943*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- _i=(_i)+(1);
- }
- *((T943*)(C))=*((T943*)(_other));
- }
- /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].storage*/
- /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].capacity*/
- /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].lower*/
- /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].put*/
- /*No:ARRAY[DICTIONARY[RUN_FEATURE,STRING]].upper*/
- int r943count(T943* C){
- int R=0;
- R=(((((T943*)C))->_upper/*8*/)-((((T943*)C))->_lower/*12*/))+(1);
- return R;
- }
- /*No:FIXED_ARRAY[CALL_PROC_CALL].clear_all*/
- /*No:FIXED_ARRAY[CALL_PROC_CALL].set_all_with*/
- void r569make(T569* C,int a1){
- /*IF*/if ((a1)==(0)) {
- C->_upper=-(1);
- }
- else if (((((T569*)C))->_capacity/*4*/)==(0)) {
- C->_storage=calloc(a1,sizeof(T0*));
- C->_capacity=a1;
- C->_upper=(a1)-(1);
- }
- else if (((((T569*)C))->_capacity/*4*/)<(a1)) {
- C->_storage=calloc(a1,sizeof(T0*));
- C->_capacity=a1;
- C->_upper=(a1)-(1);
- }
- else {
- C->_upper=(a1)-(1);
- /*[IRF3.6clear_all*/{T569* C1=C;
- T0* __value=NULL;
- /*[IRF3.6set_all_with*/{T569* C2=C1;
- T0* c1=__value;
- r98set_all_with((((T569*)C2))->_storage/*0*/,c1,(((T569*)C2))->_upper/*8*/);
- }/*]*/
- }/*]*/
- }
- /*FI*/}
- void r569resize(T569* C,int a1){
- T0* _elt_default=NULL;
- int _i=0;
- int _new_capacity=0;
- /*IF*/if ((a1)<=(/*(IRF4.6count*/((((T569*)C))->_upper/*8*/)+(1)/*)*/)) {
- C->_upper=(a1)-(1);
- }
- else {
- _new_capacity=a1;
- /*IF*/if (((((T569*)C))->_capacity/*4*/)<(_new_capacity)) {
- /*IF*/if (((((T569*)C))->_capacity/*4*/)==(0)) {
- C->_storage=calloc(_new_capacity,sizeof(T0*));
- }
- else {
- C->_storage=r98realloc((((T569*)C))->_storage/*0*/,(((T569*)C))->_capacity/*4*/,_new_capacity);
- }
- /*FI*/C->_capacity=_new_capacity;
- }
- /*FI*/_new_capacity=(((T569*)C))->_upper/*8*/;
- C->_upper=(a1)-(1);
- _i=(((T569*)C))->_upper/*8*/;
- while (!((_i)==(_new_capacity))) {
- /*[IRF3.5put*/((((T569*)C))->_storage/*0*/)[_i]=(_elt_default);
- /*]*/
- _i=(_i)-(1);
- }
- }
- /*FI*/}
- /*No:FIXED_ARRAY[CALL_PROC_CALL].storage*/
- /*No:FIXED_ARRAY[CALL_PROC_CALL].capacity*/
- /*No:FIXED_ARRAY[CALL_PROC_CALL].put*/
- /*No:FIXED_ARRAY[CALL_PROC_CALL].upper*/
- /*No:FIXED_ARRAY[CALL_PROC_CALL].count*/
- /*No:ARRAY[INTEGER].clear_all*/
- /*No:ARRAY[INTEGER].set_all_with*/
- void r429make(T429* C,int a1,int a2){
- int _needed=0;
- C->_lower=a1;
- C->_upper=a2;
- _needed=((a2)-(a1))+(1);
- /*IF*/if ((_needed)>(0)) {
- /*IF*/if (((((T429*)C))->_capacity/*4*/)<(_needed)) {
- /*IF*/if (((((T429*)C))->_capacity/*4*/)==(0)) {
- C->_storage=calloc(_needed,sizeof(int));
- }
- else {
- C->_storage=calloc(_needed,sizeof(int));
- }
- /*FI*/C->_capacity=_needed;
- }
- else {
- /*[IRF3.6clear_all*/{T429* C1=C;
- int __value=0;
- /*[IRF3.6set_all_with*/{T429* C2=C1;
- int c1=__value;
- r686set_all_with((((T429*)C2))->_storage/*0*/,c1,((((T429*)C2))->_upper/*8*/)-((((T429*)C2))->_lower/*12*/));
- }/*]*/
- }/*]*/
- }
- /*FI*/}
- /*FI*/}
- int r429item(T429* C,int a1){
- int R=0;
- R=((((T429*)C))->_storage/*0*/)[(a1)-((((T429*)C))->_lower/*12*/)];
- return R;
- }
- void r429resize(T429* C,int a1,int a2){
- int _mem=0;
- int _up=0;
- int _i=0;
- T0* _other=NULL;
- {T429*n=malloc(sizeof(*n));
- *n=M429;
- r429make(n,a1,a2);
- _other=(T0*)n;
- }
- _i=r2max((((T429*)C))->_lower/*12*/,(((T429*)((T429*)_other)))->_lower/*12*/);
- _up=r2min((((T429*)C))->_upper/*8*/,(((T429*)((T429*)_other)))->_upper/*8*/);
- while (!((_i)>(_up))) {
- /*[IRF3.6put*/{T429* C1=((T429*)_other);
- int b1=r429item(C,_i);
- int b2=_i;
- ((((T429*)C1))->_storage/*0*/)[(b2)-((((T429*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- _i=(_i)+(1);
- }
- *((T429*)(C))=*((T429*)(_other));
- }
- /*No:ARRAY[INTEGER].storage*/
- /*No:ARRAY[INTEGER].capacity*/
- /*No:ARRAY[INTEGER].lower*/
- /*No:ARRAY[INTEGER].put*/
- /*No:ARRAY[INTEGER].upper*/
- void r429add_last(T429* C,int a1){
- int _new_capacity=0;
- /*IF*/if (((((T429*)C))->_capacity/*4*/)<((r429count(C))+(1))) {
- /*IF*/if (((((T429*)C))->_capacity/*4*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T429*)C))->_capacity/*4*/,sizeof(int));
- }
- else {
- _new_capacity=(2)*((((T429*)C))->_capacity/*4*/);
- C->_storage=r686realloc((((T429*)C))->_storage/*0*/,(((T429*)C))->_capacity/*4*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T429*)C))->_upper/*8*/)+(1);
- /*[IRF3.6put*/{T429* C1=C;
- int b1=a1;
- int b2=(((T429*)C))->_upper/*8*/;
- ((((T429*)C1))->_storage/*0*/)[(b2)-((((T429*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- }
- int r429count(T429* C){
- int R=0;
- R=(((((T429*)C))->_upper/*8*/)-((((T429*)C))->_lower/*12*/))+(1);
- return R;
- }
- T0* r764item(T764* C,int a1){
- T0* R=NULL;
- R=((((T764*)C))->_storage/*0*/)[(a1)-((((T764*)C))->_lower/*12*/)];
- return R;
- }
- /*No:ARRAY[FEATURE_CLAUSE].storage*/
- /*No:ARRAY[FEATURE_CLAUSE].capacity*/
- /*No:ARRAY[FEATURE_CLAUSE].lower*/
- /*No:ARRAY[FEATURE_CLAUSE].put*/
- /*No:ARRAY[FEATURE_CLAUSE].upper*/
- int r764count(T764* C){
- int R=0;
- R=(((((T764*)C))->_upper/*8*/)-((((T764*)C))->_lower/*12*/))+(1);
- return R;
- }
- void r764add_last(T764* C,T0* a1){
- int _new_capacity=0;
- /*IF*/if (((((T764*)C))->_capacity/*4*/)<((r764count(C))+(1))) {
- /*IF*/if (((((T764*)C))->_capacity/*4*/)==(0)) {
- C->_capacity=16;
- C->_storage=calloc((((T764*)C))->_capacity/*4*/,sizeof(T0*));
- }
- else {
- _new_capacity=(2)*((((T764*)C))->_capacity/*4*/);
- C->_storage=r42realloc((((T764*)C))->_storage/*0*/,(((T764*)C))->_capacity/*4*/,_new_capacity);
- C->_capacity=_new_capacity;
- }
- /*FI*/}
- /*FI*/C->_upper=((((T764*)C))->_upper/*8*/)+(1);
- /*[IRF3.6put*/{T764* C1=C;
- T0* b1=a1;
- int b2=(((T764*)C))->_upper/*8*/;
- ((((T764*)C1))->_storage/*0*/)[(b2)-((((T764*)C1))->_lower/*12*/)]=(b1);
- }/*]*/
- }
-
-